<%@page import="org.prs.model.User"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="org.apache.commons.validator.GenericValidator"%>
<%@page contentType="text/html"  language="java" %>
<%
            String userCreationMessage = (String) session.getAttribute("usertypecreationmsg");
            session.setAttribute("usertypecreationmsg", null);
            User loggedInUser = (User) session.getAttribute("loggedinuser");

            if (loggedInUser == null) {
                session.setAttribute("loginmsg", "<div id='loginmsg'>Please log in to use services</div>");
                response.sendRedirect("index.jsp");
            }
%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Patnership Record System</title>
        <link href="style.css" rel="stylesheet" type="text/css" media="screen" />

        <script type="text/javascript" src="js/menu.js">
        </script>
        <title>Welcome to Patnership Registration System</title>
        <link rel="SHORTCUT ICON" href="images/favicon.ico" />
        <link rel="stylesheet" type="text/css" href="css/menu/menu.css"/>
        <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.10.custom.min.js"></script>
        <link rel="stylesheet" href="css/jquery/jquery-ui-1.8.10.custom.css" type="text/css" />
    </head>
    <body>
        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1><a href="#">Patnership Record System </a></h1>
                </div>
                <div id="menu">
                    <jsp:include page="includes/header.jsp"></jsp:include>
                </div>
            </div>
            <!-- end #header -->
            <div id="page">
                <div id="page-bgtop">
                    <div id="page-bgbtm">
                        <div id="content">
                            <form class='foorm' name='newUserTypeForm' id='newUserTypeForm' method='post' action='newusertype'>
                                <%
                                            if (!GenericValidator.isBlankOrNull(userCreationMessage)) {
                                                out.println(userCreationMessage);
                                            }
                                %>
                                The fields marked with <font color='#ff0000'>*</font> are mandatory<br />
                                <table border='0' cellpadding='0' style='width: 100%;'>
                                    <tr>
                                        <td width='50%'><label><font color='#ff0000'>*</font>Type Name</label></td>
                                        <td width='50%'><input type='text' size='30' name='typename' value='' id='typename'/></td>
                                    </tr>
                                    <tr>
                                        <td width='50%'><label>Description</label></td>
                                        <td width='50%'><input type='text' size='30' name='description' value='' id='description'/></td>
                                    </tr>                                    
                                    <tr>
                                        <td colspan='2' width='100%'>
                                            <input type='submit' name='newusertypesubmit' id='newusertypesubmit' value='Register User Type'/>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                        <!-- end #content -->
                        <div id="sidebar">
                            <!-- Navigation Start-->
                            <jsp:include page="includes/userProfile.jsp"/>

                            </div>

                        </div>
                        <!-- end #sidebar -->
                        <div style="clear: both;">&nbsp;</div>
                    </div>
                </div>
            </div>
            <!-- end #page -->
        </div>
        <div id="footer">
            <p>Copyright (c) 2011 prs.org. All rights reserved. Design by <a href="http://rwebs.javassl.com/">Java Servlet Systems Limited</a>.</p>
        </div>
        <!-- end #footer -->
    </body>
</html>
